<?php

namespace common\models\patient;

use Yii;

/**
 * This is the model class for table "{{%patient_type}}".
 *
 * @property int $id
 * @property string $name 名称
 * @property int $channel_id E看牙渠道ID【fy_linkedcare_channel.id】
 * @property int $status 状态【-1删除、0禁用、1正常】
 * @property int $sort 排序【正序】
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class PatientType extends \common\models\base\BaseModel
{
    const STATUS_DELETE = -1;// 删除
    const STATUS_INVALID = 0;// 失效
    const STATUS_ENABLE = 1;// 正常

    public static $statuss = [
        self::STATUS_DELETE => '删除',
        self::STATUS_INVALID => '禁用',
        self::STATUS_ENABLE => '正常',
    ];

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%patient_type}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['channel_id', 'status', 'sort', 'created_at', 'updated_at'], 'integer'],
            [['name'], 'string', 'max' => 16],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '名称',
            'channel_id' => 'E看牙渠道ID【fy_linkedcare_channel.id】',
            'status' => '状态【-1删除、0禁用、1正常】',
            'sort' => '排序【正序】',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
